#!perl -T

use Test::More tests => 4;
use Test::Output;

use Data::PrintUtils qw(:ALL);

$Data::PrintUtils::USE_PIDS = 0;
$Data::PrintUtils::USE_TIME = 0;
stdout_like {say_pid("Hello")} qr/Hello/, "say_pid - no decoration";

$Data::PrintUtils::USE_PIDS = 1;
$Data::PrintUtils::USE_TIME = 0;
stdout_like {say_pid("Hello")} qr/.*:.*Hello/ms, "say_pid - just PID";

$Data::PrintUtils::USE_PIDS = 0;
$Data::PrintUtils::USE_TIME = 1;
stdout_like {say_pid("Hello")} qr/.*\..*:.*Hello/ms, "say_pid - just time";

$Data::PrintUtils::USE_PIDS = 1;
$Data::PrintUtils::USE_TIME = 1;
stdout_like {say_pid("Hello")} qr/.*:.*\..*Hello/ms, "say_pid - PID and time";


